<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>WB32L003 Standard Peripherals Firmware Library: SPI</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">WB32L003 Standard Peripherals Firmware Library
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">模块</a> &#124;
<a href="#nested-classes">结构体</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">SPI<div class="ingroups"><a class="el" href="group___w_b32_l003___std_periph___driver.html">WB32L003_StdPeriph_Driver</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>SPI driver modules  
<a href="#details">更多...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
模块</h2></td></tr>
<tr class="memitem:group___s_p_i___exported___constants"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_p_i___exported___constants.html">SPI_Exported_Constants</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group___s_p_i___private___functions"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_p_i___private___functions.html">SPI_Private_Functions</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
结构体</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_i___init_type_def.html">SPI_InitTypeDef</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI Init structure definition  <a href="struct_s_p_i___init_type_def.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:gad5135300763c75dbb446861536359f12"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>IS_SPI_MODE</b>(MODE)</td></tr>
<tr class="separator:gad5135300763c75dbb446861536359f12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc1cc5b1ff7e801a409a7a1e6047acf9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>IS_SPI_CPOL</b>(CPOL)</td></tr>
<tr class="separator:gafc1cc5b1ff7e801a409a7a1e6047acf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6441f08edf79dd5b243c54b888d3cbf7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>IS_SPI_CPHA</b>(CPHA)</td></tr>
<tr class="separator:ga6441f08edf79dd5b243c54b888d3cbf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabbeedf42eccef1bae4f88c606fc3b261"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>IS_SPI_NSS</b>(NSS)</td></tr>
<tr class="separator:gabbeedf42eccef1bae4f88c606fc3b261"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae79f46ed9f91e39dc1f6912cb25fc716"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>IS_SPI_BAUDRATE_PRESCALER</b>(PRESCALER)</td></tr>
<tr class="separator:gae79f46ed9f91e39dc1f6912cb25fc716"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf54f84a30a5914b54dbfdc186720d0ba"><td class="memItemLeft" align="right" valign="top"><a id="gaf54f84a30a5914b54dbfdc186720d0ba"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>IS_SPI_ALL_PERIPH</b>(PERIPH)&#160;&#160;&#160;((PERIPH) == SPI)</td></tr>
<tr class="separator:gaf54f84a30a5914b54dbfdc186720d0ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:gae33578348c53fb7140d994563bdf8ae4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_p_i.html#gae33578348c53fb7140d994563bdf8ae4">SPI_DeInit</a> (<a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *SPIx)</td></tr>
<tr class="memdesc:gae33578348c53fb7140d994563bdf8ae4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinitializes the SPIx peripheral registers to their default reset values.  <a href="#gae33578348c53fb7140d994563bdf8ae4">更多...</a><br /></td></tr>
<tr class="separator:gae33578348c53fb7140d994563bdf8ae4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8dacc1dc48bf08c0f12da409f4889037"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_p_i.html#ga8dacc1dc48bf08c0f12da409f4889037">SPI_Init</a> (<a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *SPIx, <a class="el" href="struct_s_p_i___init_type_def.html">SPI_InitTypeDef</a> *SPI_InitStruct)</td></tr>
<tr class="memdesc:ga8dacc1dc48bf08c0f12da409f4889037"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the SPIx peripheral according to the specified parameters in the SPI_InitStruct.  <a href="#ga8dacc1dc48bf08c0f12da409f4889037">更多...</a><br /></td></tr>
<tr class="separator:ga8dacc1dc48bf08c0f12da409f4889037"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa31357879a65ee1ed7223f3b9114dcf3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_p_i.html#gaa31357879a65ee1ed7223f3b9114dcf3">SPI_Cmd</a> (<a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *SPIx, FunctionalState NewState)</td></tr>
<tr class="memdesc:gaa31357879a65ee1ed7223f3b9114dcf3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified SPI peripheral.  <a href="#gaa31357879a65ee1ed7223f3b9114dcf3">更多...</a><br /></td></tr>
<tr class="separator:gaa31357879a65ee1ed7223f3b9114dcf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8381d7b9faeb801481d0440a284ea5b7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_p_i.html#ga8381d7b9faeb801481d0440a284ea5b7">SPI_NSSConfig</a> (<a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *SPIx, FunctionalState NewState)</td></tr>
<tr class="memdesc:ga8381d7b9faeb801481d0440a284ea5b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the specified slave select line.  <a href="#ga8381d7b9faeb801481d0440a284ea5b7">更多...</a><br /></td></tr>
<tr class="separator:ga8381d7b9faeb801481d0440a284ea5b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf66ea17ceb7a970aa0bd9103c7fe7af0"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_p_i.html#gaf66ea17ceb7a970aa0bd9103c7fe7af0">SPI_ReadData</a> (<a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *SPIx)</td></tr>
<tr class="memdesc:gaf66ea17ceb7a970aa0bd9103c7fe7af0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read one data from DATA register.  <a href="#gaf66ea17ceb7a970aa0bd9103c7fe7af0">更多...</a><br /></td></tr>
<tr class="separator:gaf66ea17ceb7a970aa0bd9103c7fe7af0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaceed77570b964d304601272b48581afb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_p_i.html#gaceed77570b964d304601272b48581afb">SPI_WriteData</a> (<a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *SPIx, uint8_t Data)</td></tr>
<tr class="memdesc:gaceed77570b964d304601272b48581afb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write one data to DATA register.  <a href="#gaceed77570b964d304601272b48581afb">更多...</a><br /></td></tr>
<tr class="separator:gaceed77570b964d304601272b48581afb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga680c68d0ae518c16f066e13aa4dc9e7a"><td class="memItemLeft" align="right" valign="top">FlagStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_p_i.html#ga680c68d0ae518c16f066e13aa4dc9e7a">SPI_GetFlagStatus</a> (<a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *SPIx, uint8_t SPI_FLAG)</td></tr>
<tr class="memdesc:ga680c68d0ae518c16f066e13aa4dc9e7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the specified SPIx flag is set or not.  <a href="#ga680c68d0ae518c16f066e13aa4dc9e7a">更多...</a><br /></td></tr>
<tr class="separator:ga680c68d0ae518c16f066e13aa4dc9e7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<p>SPI driver modules </p>
<h2 class="groupheader">宏定义说明</h2>
<a id="gae79f46ed9f91e39dc1f6912cb25fc716"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae79f46ed9f91e39dc1f6912cb25fc716">&#9670;&nbsp;</a></span>IS_SPI_BAUDRATE_PRESCALER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IS_SPI_BAUDRATE_PRESCALER</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">PRESCALER</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">(((PRESCALER) == SPI_BAUD_RATE_PRESCALER_2)  || \</div><div class="line">                                              ((PRESCALER) == SPI_BAUD_RATE_PRESCALER_4)  || \</div><div class="line">                                              ((PRESCALER) == SPI_BAUD_RATE_PRESCALER_8)  || \</div><div class="line">                                              ((PRESCALER) == SPI_BAUD_RATE_PRESCALER_16) || \</div><div class="line">                                              ((PRESCALER) == SPI_BAUD_RATE_PRESCALER_32) || \</div><div class="line">                                              ((PRESCALER) == SPI_BAUD_RATE_PRESCALER_64) || \</div><div class="line">                                              ((PRESCALER) == SPI_BAUD_RATE_PRESCALER_128))</div></div><!-- fragment -->
</div>
</div>
<a id="ga6441f08edf79dd5b243c54b888d3cbf7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6441f08edf79dd5b243c54b888d3cbf7">&#9670;&nbsp;</a></span>IS_SPI_CPHA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IS_SPI_CPHA</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">CPHA</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">(((CPHA) == SPI_CPHA_1Edge) || \</div><div class="line">                           ((CPHA) == SPI_CPHA_2Edge))</div></div><!-- fragment -->
</div>
</div>
<a id="gafc1cc5b1ff7e801a409a7a1e6047acf9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafc1cc5b1ff7e801a409a7a1e6047acf9">&#9670;&nbsp;</a></span>IS_SPI_CPOL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IS_SPI_CPOL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">CPOL</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">(((CPOL) == SPI_CPOL_Low) || \</div><div class="line">                           ((CPOL) == SPI_CPOL_High))</div></div><!-- fragment -->
</div>
</div>
<a id="gad5135300763c75dbb446861536359f12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad5135300763c75dbb446861536359f12">&#9670;&nbsp;</a></span>IS_SPI_MODE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IS_SPI_MODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">MODE</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">(((MODE) == SPI_MODE_SLAVE) || \</div><div class="line">                           ((MODE) == SPI_MODE_MASTER))</div></div><!-- fragment -->
</div>
</div>
<a id="gabbeedf42eccef1bae4f88c606fc3b261"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabbeedf42eccef1bae4f88c606fc3b261">&#9670;&nbsp;</a></span>IS_SPI_NSS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IS_SPI_NSS</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">NSS</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">(((NSS) == SPI_NSS_MODE_HIGH) || \</div><div class="line">                         ((NSS) == SPI_NSS_MODE_LOW))</div></div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="gaa31357879a65ee1ed7223f3b9114dcf3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa31357879a65ee1ed7223f3b9114dcf3">&#9670;&nbsp;</a></span>SPI_Cmd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_Cmd </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *&#160;</td>
          <td class="paramname"><em>SPIx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FunctionalState&#160;</td>
          <td class="paramname"><em>NewState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables or disables the specified SPI peripheral. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">SPIx</td><td>Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. </td></tr>
    <tr><td class="paramname">NewState</td><td>new state of the SPIx peripheral. This parameter can be: ENABLE or DISABLE. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae33578348c53fb7140d994563bdf8ae4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae33578348c53fb7140d994563bdf8ae4">&#9670;&nbsp;</a></span>SPI_DeInit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_DeInit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *&#160;</td>
          <td class="paramname"><em>SPIx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deinitializes the SPIx peripheral registers to their default reset values. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">SPIx</td><td>Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga680c68d0ae518c16f066e13aa4dc9e7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga680c68d0ae518c16f066e13aa4dc9e7a">&#9670;&nbsp;</a></span>SPI_GetFlagStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FlagStatus SPI_GetFlagStatus </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *&#160;</td>
          <td class="paramname"><em>SPIx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>SPI_FLAG</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks whether the specified SPIx flag is set or not. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">SPIx</td><td>Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. </td></tr>
    <tr><td class="paramname">SPI_FLAG</td><td>specifies the SPI flag to check. This parameter can be one of the following values: <ul>
<li>SPI_FLAG_SPIF: End of transmission flag. </li>
<li>SPI_FLAG_WCOL: Write conflict flag. </li>
<li>SPI_FLAG_SSERR: Slave mode SSN error flag. </li>
<li>SPI_FLAG_MDF: Host mode error flag. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">The</td><td>new state of SPI_FLAG (SET or RESET). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8dacc1dc48bf08c0f12da409f4889037"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8dacc1dc48bf08c0f12da409f4889037">&#9670;&nbsp;</a></span>SPI_Init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_Init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *&#160;</td>
          <td class="paramname"><em>SPIx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_p_i___init_type_def.html">SPI_InitTypeDef</a> *&#160;</td>
          <td class="paramname"><em>SPI_InitStruct</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the SPIx peripheral according to the specified parameters in the SPI_InitStruct. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">SPIx</td><td>Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. </td></tr>
    <tr><td class="paramname">SPI_InitStruct</td><td>pointer to a <a class="el" href="struct_s_p_i___init_type_def.html" title="SPI Init structure definition">SPI_InitTypeDef</a> structure that contains the configuration information for the specified SPI peripheral. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8381d7b9faeb801481d0440a284ea5b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8381d7b9faeb801481d0440a284ea5b7">&#9670;&nbsp;</a></span>SPI_NSSConfig()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_NSSConfig </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *&#160;</td>
          <td class="paramname"><em>SPIx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FunctionalState&#160;</td>
          <td class="paramname"><em>NewState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables or disables the specified slave select line. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">SPIx</td><td>Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. </td></tr>
    <tr><td class="paramname">NewState</td><td>new state of the slave select line. This parameter can be: ENABLE or DISABLE. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf66ea17ceb7a970aa0bd9103c7fe7af0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf66ea17ceb7a970aa0bd9103c7fe7af0">&#9670;&nbsp;</a></span>SPI_ReadData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t SPI_ReadData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *&#160;</td>
          <td class="paramname"><em>SPIx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read one data from DATA register. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">SPIx</td><td>Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">The</td><td>read data. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaceed77570b964d304601272b48581afb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaceed77570b964d304601272b48581afb">&#9670;&nbsp;</a></span>SPI_WriteData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPI_WriteData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_p_i___type_def.html">SPI_TypeDef</a> *&#160;</td>
          <td class="paramname"><em>SPIx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>Data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write one data to DATA register. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">SPIx</td><td>Pointer to selected SPI peripheral. This parameter can be one of the following values: SPI. </td></tr>
    <tr><td class="paramname">Data</td><td>The data to write. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by Westberry Technology (ChangZhou) Corp., Ltd. All rights reserved.
</small></address>
</body>
</html>
